"""
@author: ty
@file: tianyang.py
@time: 2022/11/24 19:37
"""

import random, string
def num(N):
    for i in range(N):
        # 激活码由A-Z 0-9 随机组成   随机选取一位
        num1 = random.sample(string.ascii_uppercase+string.digits,32)
        print(''.join(num1))
        with open('激活码.txt', 'a+', encoding='utf-8') as fp:
            fp.write((''.join(num1)) + '\n')